package com.ceair.config;

import org.springframework.boot.context.properties.ConfigurationProperties;
import org.springframework.stereotype.Component;

/**
 * @author wangbaohai
 * @ClassName MyUrlConfig
 * @description: 自定义OAuth跳转链接地址
 * @date 2025年01月14日
 * @version: 1.0.0
 */
@Component
@ConfigurationProperties(prefix = "my-url")
public class MyUrlConfig {

    /**
     * 授权确认页面地址
     */
    public static String DEVICE_ACTIVATE_URI;
    /**
     * 授权确认页面地址
     */
    public static String CONSENT_PAGE_URI;
    /**
     * 授权确认页面地址
     */
    public static String DEVICE_ACTIVATED_URI;
    /**
     * 授权确认页面地址
     */
    public static String LOGIN_PAGE_URI;

    /**
     * VUE首页地址
     */
    public static String VUE_APP_URI;

    /**
     * 回调地址
     */
    public static String REDIRECT_URI;

    /**
     * PKCE回调地址
     */
    public static String PKCE_REDIRECT_URI;

    /**
     * 当前服务器地址
     */
    public static String SERVER_URL;

    /**
     * 网关服务地址
     */
    public static String GATEWAY_URL;

    /**
     * swagger 文档地址
     */
    public static String SPRING_DOC_REDIRECT_URI;

    /**
     * issuer jwt签发者、默认端点请求地址
     */
    public static String ISSUER_URL;

    public void setDeviceActivateUri(String DEVICE_ACTIVATE_URI) {
        MyUrlConfig.DEVICE_ACTIVATE_URI = DEVICE_ACTIVATE_URI;
    }

    public void setConsentPageUri(String CONSENT_PAGE_URI) {
        MyUrlConfig.CONSENT_PAGE_URI = CONSENT_PAGE_URI;
    }

    public void setDeviceActivatedUri(String DEVICE_ACTIVATED_URI) {
        MyUrlConfig.DEVICE_ACTIVATED_URI = DEVICE_ACTIVATED_URI;
    }

    public void setLoginPageUri(String LOGIN_PAGE_URI) {
        MyUrlConfig.LOGIN_PAGE_URI = LOGIN_PAGE_URI;
    }

    public void setVueAppUri(String VUE_APP_URI) {
        MyUrlConfig.VUE_APP_URI = VUE_APP_URI;
    }

    public void setPkceRedirectUri(String PKCE_REDIRECT_URI) {
        MyUrlConfig.PKCE_REDIRECT_URI = PKCE_REDIRECT_URI;
    }

    public void setRedirectUri(String REDIRECT_URI) {
        MyUrlConfig.REDIRECT_URI = REDIRECT_URI;
    }

    public void setServerUrl(String SERVER_URL) {
        MyUrlConfig.SERVER_URL = SERVER_URL;
    }

    public void setGatewayUrl(String GATEWAY_URL) {
        MyUrlConfig.GATEWAY_URL = GATEWAY_URL;
    }

    public void setSpringDocRedirectUri(String SPRING_DOC_REDIRECT_URI) {
        MyUrlConfig.SPRING_DOC_REDIRECT_URI = SPRING_DOC_REDIRECT_URI;
    }

    public void setIssuerUrl(String ISSUER_URL) {
        MyUrlConfig.ISSUER_URL = ISSUER_URL;
    }

}
